#include<iostream>
#include"PollServer.hpp"

void Usage(std::string proc)
{
    std::cout<<"Usage : \n\t" <<proc<<"local_port\n"<<std::endl;
}

int main(int argc,char*argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
    }
    int port=std::stoi(argv[1]);
    std::unique_ptr<PollServer> svr=std::make_unique<PollServer>(port);
    svr->InitServer();
    svr->loop();
}